import sys,random

First = ('赵','钱','孙','李','周','吴','正','王','许','金')

Last = ('仁','义','礼','智','信','德','体','美','劳','金','木','水','火','土','风') #0

SecondLast = ('飞燕','都来','义坚','克强','润发','心语','当卫','得发','三金','志文','三多','亦凡','依然','德刚') #1

while True:
    FirstName = random.choice(First)#choice()函数会随机的从非空序列中选择一个元素

    LastName = random.choice(Last)

    SecondLastName = random.choice(SecondLast)

    Flag = random.uniform(0,1) #随机生成0~1之间的小数

    if Flag > 0.5:
        print('{} {}'.format(FirstName, LastName), file=sys.stderr)  # 名字显示为红色
    elif Flag <= 0.5:
        print('{} {}'.format(FirstName, SecondLastName), file=sys.stderr)

    try_again = input('\n是否重新选择(是按任意键否按n\n)')

    if try_again.lower() == 'n':  #lower()函数将所有字幕转换成小写
        break